//
//  NKFindTableViewCell.m
//  NewKY
//
//  Created by 徐腾 on 2016/11/13.
//  Copyright © 2016年 Dee. All rights reserved.
//

#import "NKFindTableViewCell.h"
#import <UIImageView+WebCache.h>

@interface NKFindTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;

@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@property (weak, nonatomic) IBOutlet UILabel *doctorLabel;

@property (weak, nonatomic) IBOutlet UILabel *hospitalLabel;

@property (weak, nonatomic) IBOutlet UILabel *crucifixNumber;

@property (weak, nonatomic) IBOutlet UILabel *flowerNumber;

@property (weak, nonatomic) IBOutlet UILabel *jinqiNumber;


@end


@implementation NKFindTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];

}


- (void)setModel:(NKFindModel *)model{
    
    _model = model;
    
    self.nameLabel.text = model.doctor_name;
    
    self.doctorLabel.text = model.doctor_title_name;
    
    self.hospitalLabel.text = model.hospital_name;
    
    self.crucifixNumber.text = @(model.doctor_attention_id).description;
    
    self.flowerNumber.text = @(model.flower).description;
    
    self.jinqiNumber.text = @(model.banner).description;
    
}

-(void)setDoctorModel:(HLDoctorListModel *)doctorModel{
    
    _doctorModel = doctorModel;
    
    NSURL * url = [NSURL URLWithString:doctorModel.doctor_portrait];
    
    [self.iconImageView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"patient_defaultphoto_male"]];
    
    self.nameLabel.text = doctorModel.doctor_name;
    
    self.doctorLabel.text = doctorModel.doctor_title_name;
    
    self.hospitalLabel.text = doctorModel.doctor_hospital_name;
    
//    self.crucifixNumber.text = @(doctorModel.doctor_attention_id).description;
    
    self.flowerNumber.text = @(doctorModel.flower).description;
    
    self.jinqiNumber.text = @(doctorModel.banner).description;
    
    
}

/*
 {
	flower = 4;
	operation_count = 1;
	banner = 5;
	doctor_hospital_name = 医科院肿瘤医院;
	doctor_name = 张连海;
	doctor_portrait = http://www.bjcancer.org/Sites_OldFiles/Template/default/picture/doctor/5-large.jpg;
	doctor_id = 200000126;
	doctor_title_name = 其他;
	doctor_gender = 1;
	accuracy = 98%;
	easymob_id = d200000126;
 }
 
 */

@end
